﻿using System.Collections.Generic;
using Yuebon.CMS.Dtos;
using Yuebon.CMS.IServices;
using Yuebon.CMS.Models;
using Yuebon.Commons;
using Yuebon.Commons.IoC;
using Yuebon.Commons.Models;

namespace Yuebon.CMS.Application
{
    public class AdvertApp
    {

        IAdvertService service = IoCContainer.Resolve<IAdvertService>();

        /// <summary>
        /// 根据条件查询数据库,返回广告位数量
        /// </summary>
        public Advert GetWhere(string adid)
        {
            Advert advert = service.Get(string.Format("Id='{0}'", adid));
            return advert;
        }
    }
}

